<template>
	<view>
		<!-- <u-navbar back-text="返回" title="剑未配妥，出门已是江湖"></u-navbar> -->
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				url: ''
			}
		},
		onLoad(e) {
		
		},
		onShow() {
			// this.url = 'https://web.kdk59.top/?sn=' + uni.getStorageSync('sn')
			this.getUrl();
			uni.switchTab({
				url: '/pages/index/index'
			})
		},
		onBackPress () {
			uni.switchTab({
				url: '/pages/index/index'
			})
		},
		methods: {
			getUrl(){
				this.$request('', '/api/app/coupon/geturl', 'POST', {
				}, {}).then(res => {
					console.log(res)
					if(res.status==1){
						uni.navigateTo({
							url: '/pages/tz/index?url=' + res.url
						})
					}
				})
			}
		}
	}
</script>

<style>
</style>
